<include file='Public:header_agent'/>  

  <!-- Start: Content -->
  <section id="content">
    <div id="topbar" class="affix">
      <ol class="breadcrumb">
       <li style="font-size:1.3em"><a href="<?php echo '__ROOT__/index' ?>"><span>返回首页</span></a></li>
        <li style="font-size:1.3em"><a href="javascript:void(0)" onclick="history.go(-1)" class="back"><span>返回上一层</span></a></li>
        <li style="font-size:1.3em"><a href="<?php echo '__ROOT__/supervise' ?>" class="back"><span>代理商信息</span></a></li>
      </ol>
    </div>
    <div class="container">

	 <div class="row">
        <div class="col-md-12">
			<div class="panel">

              
                <div class="panel-body">
				<div>
					<form action="" method="get" id="form">
						<div class="panel-heading" style="float:left">
						 代理ID：<input style="outline:none;height:30px;border-radius:8px;" id="username" name="userid" 
             value="<?php echo empty($_GET['userid'])?'':$_GET['userid'];?>" type="" class="txt">
						</div>
						 <div class="panel-heading" style="float:left">
						 代理姓名<input style="outline:none;height:30px;border-radius:8px;" id="username" name="name" 
             value="<?php echo empty($_GET['name'])?'':$_GET['name'];?>" type="" class="txt">
						</div>
						<div class="panel-heading" style="float:left;width:60%;">
						 注册时间：
						 <input type="text" class="Wdate" name="sdate" onFocus="WdatePicker({lang:'zh-cn',dateFmt:'yyyy-MM-dd HH:mm:ss ',readOnly:true})" style="height:30px;font-size:1px;border-radius:8px;" value="<?php echo empty($_GET['sdate'])?'':$_GET['sdate'];?>"/>
						--
						<input type="text" class="Wdate" name="edate" onFocus="WdatePicker({lang:'zh-cn',dateFmt:'yyyy-MM-dd HH:mm:ss ',readOnly:true})" style="height:30px;font-size:1px;border-radius:8px;" value="<?php echo empty($_GET['edate'])?'':$_GET['edate'];?>"/> 
            &nbsp; &nbsp;&nbsp;代理的总人数
            <a style="color:#c35b5b;font-size:1.3em"><?php echo $sum; ?></a>
						<input style="float:right;width:20%;height:25px;border-radius:9px;background:##bbb4bb;color:#000;line-height:2px;outline:none" type="submit" name="soso" value="搜索" class="btn">
						</div>
					</form>
					
				</div>
				
                  <table class="table table-striped table-bordered table-hover dataTable">
                      <tr class="active">
                        <th>代理ID</th>
                        <th>代理级别</th>
            						<th>代理账号</th>
            						<th>代理姓名</th>
            						<th>房卡数</th>
                        <th>所属地 </th>
                        <th>注册时间</th>
                        <th>上级代理为</th>
                        <th>下级代理数量</th>
                        <th>更改代理信息</th>
                        <th>刪除代理</th>
                        <!-- <th width="200">操作</th> -->
                      </tr>
					    <?php  foreach ($loadgame as $k=>$v) { ?>
                    <tr class="success">
						<!-- 其中转账任属性 以及转账前钻石 都为需要加的数据  现在外网数据库加的  ，以后更改 -->
                       <td>
                       <?php echo $v['accounts']?>
                       </td>
                        <td>
                        <?php if($v['agencylv']==0){
                        echo '总代理';}
                        elseif($v['agencylv']==1){
                        echo '一级代理';}
                        elseif($v['agencylv']==2){
                        echo '二级代理';}
                        elseif($v['agencylv']>2){
                        echo '普通代理';}?>
                        </td>
                        <td><?php echo $v['phone']?></td>
                        <td><?php echo $v['username']?></td>
                        <td><?php echo $v['gems']?></td>
                        <td><?php if($v['region']==""){echo '未填写';}else{echo $v['region'];} ?></td>
                        <td><?php echo $v['regtime'] ?></td>
                        <td><?php echo $v['referrer'] ?></td>
                        <td><?php echo $v['xaiji'] ?></td>
                        <td>
                        <a style="color:#ce0528" href="
                        <?php echo '__ROOT__/change?accounts=',$v['accounts'].'&rechargetotal=',$v['rechargetotal']; ?>">
                        <?php echo'更改' ?></a>
                        </td>
                        <td>
                        <a style="color:#ce0528" onclick="if(!confirm('您确定要删除代理 <?php echo $v["accounts"]?> 吗？ ')){return false;}" href="
                        <?php echo '__ROOT__/delagent?accounts=',$v['accounts']; ?>"><?php echo'删除' ?></a>
                        </td>
                    </tr>
						<?php }?>
                  </table>
                  <!-- <div class="pull-right">
                    <ul class="pagination" id="paginator-example">
                      <?php echo $page?>
                    </ul>
                  </div>  --> 
                </div>
              </div>
          </div>
        </div>
    </div>

    <div style="position:fixed;top:90%;right:30px;">
      <ul class="pagination" id="paginator-example" style="width: 1603px;border: solid 1px #dadada;">
                      <?php echo $page?>
      </ul>
    </div>
  </section>
  <script type="text/javascripe">
    $(function(){
          // 分页（修改链接方法）
        $('#paginator-example a').click(function(){ 
                    
            var tmpHref = $(this).attr('href');
            tmpHref = tmpHref.replace(/\/selCon\//,"");
            $("#form").attr("action", tmpHref);
            $("#form").submit();
                    
            return false; 
        });
    }

	
	
	$(function(){
        //查询
        $("#selecting").click(function(){
            $("#form").attr("action", "__URL__/listDept/p/1");
            $("#form").submit();
        });
    }

  </script>
  <!-- End: Content --> 
<include file='Public:footer'/> 